home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1999 Spring / macformat-077.iso / Shareware Plus / Development / SpriteWorld 2.2 / SpriteWorld files / Utils / Brian's Extensions / SWLightingSquares.h < prev    next >
Encoding:
Text File  |  1998-01-16  |  2.5 KB  |  94 lines  |  [TEXT/CWIE]

  1. ///--------------------------------------------------------------------------------------
  2. //    SWTranslucentBlitters.h
  3. ///--------------------------------------------------------------------------------------
  4.  
  5.  
  6. #ifndef __LIGHTINGSQUARES__
  7. #define __LIGHTINGSQUARES__
  8.  
  9. #ifndef __TRANSLUCENCY__
  10. #include "SWTranslucentBlitters.h"
  11. #endif
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.     
  17. extern int SWLitSquareSize;
  18.     
  19. ///--------------------------------------------------------------------------------------
  20. ///--------------------------------------------------------------------------------------
  21. extern int gLightingSquareRows, gLightingSquareColumns;
  22. extern unsigned long gBlackColor;
  23.  
  24. ///--------------------------------------------------------------------------------------
  25.  
  26. SW_FUNC OSErr     SWInitializeLightingSquares (SpriteWorldPtr spriteWorldP, 
  27.                                             int squareSize);
  28. SW_FUNC void     SWExitLightingSquares(void);
  29.  
  30. SW_FUNC void SWSetLightingSquare(SpriteWorldPtr swp, int col, int row, 
  31.                          unsigned long color, unsigned long level,
  32.                          Boolean relative, Boolean makeDirty);
  33. SW_FUNC void SWDarkenLightingSquares (SpriteWorldPtr swp);
  34.  
  35. SW_FUNC void SWLightUpArea (
  36.     SpriteWorldPtr swp, 
  37.     int col, 
  38.     int row, 
  39.     unsigned long lightColor, 
  40.     int lightLevel, 
  41.     Boolean BigLight);
  42.  
  43.  
  44. ///--------------------------------------------------------------------------------------
  45.  
  46. SW_FUNC void BlitPixie8BitLitRectDrawProc(
  47.     FramePtr srcFrameP,
  48.     FramePtr dstFrameP,
  49.     Rect* srcRect,
  50.     Rect* dstRect
  51.     );
  52.  
  53. SW_FUNC unsigned char SWInline LightingConvertChar (
  54.     register unsigned char srcPixel, 
  55.     register unsigned char *tableAtLevelAndIndex);
  56. SW_FUNC unsigned short  LightingConvertShort (
  57.     register unsigned short srcPixel, 
  58.     register unsigned char *tableAtLevelAndIndex);
  59. SW_FUNC unsigned long  LightingConvertLong (
  60.     register unsigned long srcPixel, 
  61.     register unsigned char *tableAtLevelAndIndex);
  62.  
  63. SW_FUNC void BlitPixieLit8Bit(
  64.     PixelChunkPtr srcPixelP,
  65.     PixelChunkPtr dstPixelP,
  66.     register unsigned long rowsToCopy,
  67.     register unsigned long numBytesPerRow,
  68.     register unsigned long srcOffset,
  69.     register unsigned long dstOffset,
  70.     register unsigned char *tableAtLevelAndIndex);
  71.  
  72. SW_FUNC void BlitPixie16BitLitRectDrawProc(
  73.     FramePtr srcFrameP,
  74.     FramePtr dstFrameP,
  75.     Rect* srcRect,
  76.     Rect* dstRect
  77.     );
  78.  
  79. void BlitPixieLit16Bit(
  80.      unsigned short *srcPtr,
  81.      unsigned short *dstPtr,
  82.      unsigned long width,
  83.      unsigned long height,
  84.      unsigned long srcRowBytes,
  85.      unsigned long dstRowBytes,
  86.      unsigned long color,
  87.      unsigned long alpha);
  88.  
  89. #ifdef __cplusplus
  90. }
  91. #endif
  92.  
  93. #endif /* __LIGHTINGSQUARES__ */
  94.